<div id="info_orders">
    <table id="order_info">
        <tr>
            <td class="bold">Order No.: </td>
            <td><?php echo $order->getId()?></td>
            <td class="bold table_right">Status order:</td>
            <td class="table_right_info"><?php echo $order->getStatus()?></td>
        </tr>
        <tr>
            <td class="bold">Client:</td>
            <td><?php echo ContactTable::getInstance()->find($order->getContactId())->getName() ?>
            </td>
            <td class="bold table_right">Category:</td>
            <td class="table_right_info"><?php echo $order->getCategoryName()?></td>
        </tr>
        <tr>
            <td class="bold">Contact Order No.:</td>
            <td><?php echo $order->getCOrderNumber()?></td>
        </tr>
        <tr>
            <td class="bold">Ship to:</td>
            <td><?php echo $order->getShipLastname();
                  echo ', ';
                  echo $order->getShipFirstname()?>
            </td>
            <td class="bold table_right">Date in</td>
            <td class="table_right_info"><?php echo $order->getDateRecieved()?></td>
        </tr>
        <tr>
            <td class="bold">Ship address:</td>
            <td><?php echo $order->getShipAddress()?></td>
            <td class="bold table_right">Due date</td>
            <td class="table_right_info"><?php echo $order->getDateDue()?></td>
        </tr>
        <tr>
            <td class="bold">Ship ZIP code:</td>
            <td><?php echo $order->getShipZipcode()?></td>
            <td class="bold table_right">Date out</td>
            <td class="table_right_info"><?php echo $order->getDateCompleted()?></td>
        </tr>
        <tr>
            <td class="bold">Ship city:</td>
            <td><?php echo $order->getShipCity()?></td>
        </tr>
        <tr>
            <td class="bold">Ship country:</td>
            <td><?php echo $order->getShipCountry()?></td>
        </tr>
    </table>
    <table id="order_content" class="table_div">
        <tr class="bold head_small">
            <td width="10%">Item No.</td>
            <td>Name</td>
            <td>Type</td>
            <td>Price per Unit (excl. VAT)</td>
            <td width="8%">Quantity</td>
            <td width="6%">VAT(%)</td>
            <td width="8%">Discount</td>
            <td width="10%">Total Price (incl. VAT)</td>
        </tr>
        <?php foreach ($items as $i=>$item): ?>
            <tr class="table_hov <?php echo fmod($i, 2) ? 'even' : 'odd' ?> ">
                <td><?php echo $item->getItemNr() ?></td>
                <td><?php echo $item->getName() ?></td>
                <td><?php echo $item->getType() ?></td>
                <td><?php echo $item->getPrice() ?></td>
                <td><?php echo $item->getAmount() ?></td>
                <td><?php echo $item->getVAT() ?></td>
                <td><?php echo $item->getDiscount() ?></td>
                <?php                   
                    $discount = 1 - ($item->getDiscount() / 100);
                    $VAT = 1 + ($item->getVAT()/100);
                    $total = $item->getAmount() * ($item->getPrice() * $discount);
                    $tot = $total * $VAT;
                ?>
                <td><?php echo $tot ?></td>              
            </tr>
        <?php endforeach; ?>
    </table>
<!--    <div id="pager_order"><?php include_partial('pager', array('pager' => $pagerItems, 'url' => url_for('sales_show_order', $order))); ?></div>-->
    <div id="pager_order"><?php include_partial('pagerMultiple', array('pager' => $pagerItems, 'url' => url_for('sales_show_order', $order), 'kind' => 'orderinfo', 'previousKind' => 'order', 'previousPager' => $pagerOrders)); ?></div>
</div>